package com.lyu.travel.core.service.impl;

import com.lyu.travel.core.entity.Province;
import com.lyu.travel.core.mapper.ProvinceMapper;
import com.lyu.travel.core.service.ProvinceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ProjectName: [travel]
 * @Package: [com.lyu.travel.core.service.impl]
 * @ClassName: [ProvinceServiceImpl]
 * @Description: 省份实现类
 * @Author: [78483]
 * @CreateDate: [2020-06-13 18:02]
 * @UpdateUser: [78483]
 * @UpdateDate: [2020-06-13 18:02]
 * @UpdateRemark: [说明本次修改内容]
 * @Version: [v1.0]
 */
@Service
public class ProvinceServiceImpl implements ProvinceService {
    @Autowired
    private ProvinceMapper provinceMapper;

    @Override
    public List<Province> findAll() {
        return provinceMapper.selectList(null);
    }

    @Override
    public Province selectByProvincename(String name) {
        return provinceMapper.findByProvincename(name);
    }

    @Override
    public int insert(Province province) {
        return provinceMapper.insert(province);
    }

    @Override
    public int deleteProvinceById(int id){
        return provinceMapper.deleteById(id);
    }

    @Override
    public int updateProvince(Province province) {
        return provinceMapper.updateById(province);
    }

    @Override
    public Province updatePlacecounts() {
        return provinceMapper.updatePlacecounts();
    }






}
